<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<style>
		div {
			width: 300px;
			height: 2000px;
			background-color: #58a;
		}
	</style>
</head>
<body>
	<div>这里是为了撑开内容区域，让它出现滚动条，点击显示滚动条的相关尺寸</div>
	<script>

		// 滚动条相关尺寸：

		document.onclick = function () {
			var scrollT = document.documentElement.scrollTop || document.body.scrollTop;
			document.write(scrollT)
		}

	</script>
</body>
</html>